<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <style type="text/css">
	BODY,TD {FONT-FAMILY: "宋体"; FONT-SIZE: 10pt;line-height: 15px} 
	</style>
    <title>show MenuDetail</title>
  </head>
  <body bgcolor="#ccddee" link="#000066" vlink="#0066FF" alink="#99FF00">
    <br>
		<h3>查看菜单</h3>
		<fieldset><legend>菜单信息</legend>
		<table width="100%" border=1 align="center" cellpadding="0" cellspacing="0" bgcolor="#ccddee" ><tr>
			<td width="200">菜单名：${menuinfo.menuname}</td>
			<td >菜单链接：${menuinfo.url}</td>
		</tr></table>
		</fieldset>
		<s:form method="post" namespace="/base" theme="simple" action="goToAddMenu" >
		<table width="100%" border="0">
		<tr>
			<td width="50">
			<input type="submit" value="添加子菜单">
			</td>
			<td width="50">
			<input type="button" value="返回上级菜单" onclick="location.href='findToShowMenu.action?menuid=${menuinfo.menupid == -1?0:menuinfo.menupid}'">
			</td>
			<td >
				<input type="hidden" name="menuinfo.menupid" value="${menuinfo.menuid}">
			</td>
		</tr>
		</table>
		</s:form>
		<fieldset><legend>子菜单</legend>
		<table width="100%" border=1 align="center" cellpadding="0" cellspacing="0" bgcolor="#ccddee" >
				<tr>
			        <td align="center">删除</td>
			        <td align="center">菜单名称</td>
			        <td align="center">菜单链接</td>
			        <td align="center">详细/修改</td>
      			</tr>
      			<s:iterator value="pm.datas" status="rowstatus" var="menu">
      				<tr <s:if test="#rowstatus.odd == true">bgcolor="white"</s:if>>
	      				<td align="center" onmousemove=""
	      					onmouseout="" onmousedown=""><input type="checkbox" name="menuid" value="<s:property value="menuid"/>"
	      							 onclick="javascript:location.href='delmenu.action?menuid=<s:property value="menuid"/>'"/></td>
				        <td align="center"><s:property value="menuname"/></td>
				        <td align="center"><s:property value="url"/></td>
			        	<td align="center">
			        		<a href="findToShowMenu.action?menuid=<s:property value="menuid"/>">详细</a>
			        		<a href="findToUpdateMenu.action?menuid=<s:property value="menuid"/>">修改</a>
			        		<a href="goToAddMenu.action?menuinfo.menupid=<s:property value="menuid"/>">添加子菜单</a>
			        	</td>
			        </tr>
				</s:iterator>
				<tr>
					<td colspan="8" align="center">
				<pg:pager url="${url}" items="${pm.total }" export="offset,currentPageNumber=pageNumber">
					<pg:param name="menuid" value="${menuid}"/>
					<pg:first>
						<a href="${pageUrl }">首页</a>
					</pg:first>
					<pg:prev>
						<a href="${pageUrl }">前页</a>
					</pg:prev>
					<pg:pages>
						<c:choose>
							<c:when test="${currentPageNumber eq pageNumber}">
								<font color="red">${pageNumber }</font>
							</c:when>
							<c:otherwise>
								<a href="${pageUrl }">${pageNumber }</a>
							</c:otherwise>
						</c:choose>
					</pg:pages>
					<pg:next>
						<a href="${pageUrl }">后页</a>
					</pg:next>
					<pg:last>
						<a href="${pageUrl }">尾页</a>
					</pg:last>
				</pg:pager>
					</td>
				</tr>
      		</table>
		</fieldset>
		<br>
</body>
</html>
